/*
 * LogisticsMessageSingleListItem.java
 * business
 *
 * Created by SunDing on 2017/1/10.
 *
 * Copyright (c) 2017年 yidiandao. All rights reserved.
 */

package com.yidiandao.business.ui.widget.listview.displaylistitem;

import android.content.Context;
import android.view.View;

import com.yidiandao.business.data.bean.Message;
import com.yidiandao.business.ui.widget.listview.DisplayListItem;
import com.yidiandao.business.ui.widget.listview.viewholder.LogisticsMessageSingleHolder;

/**
 * 消息中心 物流通知
 */
public class NormalLogisticsMessageListItem extends DisplayListItem<LogisticsMessageSingleHolder, Message> {

    public NormalLogisticsMessageListItem(Message s) {
        super(s);
    }

    @Override
    public void onShow(final Context context, final LogisticsMessageSingleHolder holder) {
        //时间
        holder.tvTime.setText(data.getAddTime());
        //信息
        holder.tvInfo.setText(data.getContent());
        //是否已阅读
        holder.viewCircle.setVisibility(data.isRead() ? View.INVISIBLE : View.VISIBLE);
    }

    @Override
    public String getDisplayItemTag() {
        return NormalLogisticsMessageListItem.class.getSimpleName();
    }

    @Override
    public Class<LogisticsMessageSingleHolder> getViewHolderClazz() {
        return LogisticsMessageSingleHolder.class;
    }
}
